

<?php
echo $this->Form->create('Task');
?>


<?php
if ($authorImage == "")
    $authorImage = "http://localhost/default.png";
Echo "<img src=" . $authorImage . ">";
?> <br> </br> <?php echo $tweet[0]['post']['text']; ?> <br> 
<?php echo "Tweeted on " . $tweetDate . "  "; ?>
<?php
echo " by " . $tweetAuthor;

echo $this->Form->input('sentBy', array('style' => 'width:500px', 'type' => 'hidden', 'value' => $userID));
echo $this->Form->input('accID', array('style' => 'width:500px', 'type' => 'hidden', 'value' => $accID));
echo $this->Form->input('originalMessage', array('rows' => '3', 'style' => 'width:500px', 'label' => 'Message'));
?>
<div id="third" style="border:0px solid black;position:absolute;top:100;right:0;float:right;float:top;height:100%;width:20%">
    <div id="container3">
        <div id="content3">
            <div id ="header">

                <?php
                echo $this->Form->input('postID', array('type' => 'hidden', 'value' => $tweetID));

                $usersWithImage = array();
                $i = 0;
                foreach ($user as $x) {

                    if ($x['image'] == "") {
                        $x['image'] = "http://localhost/default.png";
                    }
                    $id = $x['userID'];
                    $usersWithImage[$id] = array('name' => $this->Html->image($x['image']) . $x['name'], 'id' => $id); //$this->Html->image($x['image']) . " " . $x['name'];
                    $i++;
                }
//print_r($x);
                //<div class="checkbox"><input type="checkbox" name="data[Task][sentTo][]" value="6" id="TaskSentTo6" /><label for="TaskSentTo6">karim</label></div>
                foreach ($usersWithImage as $userWithImage) {
                    ?> <div class="checkbox"><input type="checkbox" name="data[Task][sentTo][]" value="<?php echo $userWithImage['id']; ?>" id ="TaskSentTo<?php echo $userWithImage['id']; ?>" /><label for="TaskSentTo<?php echo $userWithImage['id']; ?>"><?php echo $userWithImage['name']; ?></label></div>
                    <br></br>
                    <?php
                }

                //      print_r($this->Form->input('sentTo', array('type' => 'select', 'multiple' => 'checkbox', 'options' => $usersWithImage, 'label' => 'assign to')));
//echo $this->Form->checkbox('sentTo', $usersWithImage);
//echo $this->Form->checkbox('admin',$usersWithImage);
                ?>


            </div>
        </div>
        <br/>
    </div>
</div>


<div id="first" style="border:0px solid black;position:relative;top:80px;float:left;height:20%;width:100%">
    <div id="container">
        <div id="header">
            <?php echo $this->Form->end('Assign Task'); ?>

        </div>

    </div>
</div>
